Table of Contents
Abbreviation
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Final_Project_Abbreviation.png)
PROJECT MANAGEMENT PHASE
π¨
To manage my project, various platforms are available. I chose Google Sheets to create a Gantt chart. I also utilized the ticktick app to create a Kanban board.
π¨
Even though there are various digital platforms available, Initially, I prefer to write down all the tasks that come to mind on a piece of paper. Believe me, itβs effective. Later, I would like to digitalize it.
β¬οΈ
The image below illustrates the Gantt chart of my final project.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/FINAL_PROJECT_Gantt_Chart_PIC_0002-1.png)
π¨
The image below depicts the Kanban board of the final project.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/all_task_pic_01.png)
β
The image below illustrates the tasks that were completed.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/done_taks_pic_01.png)
π΅π»ββοΈ
The image below illustrates the tasks that are ongoing.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/ongoing_pic_001.png)
π¨
The image below illustrates the tasks that are pending.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/pending_tasks_pic_01.png)
β¬οΈ
For detailed documentation, follow the link below.
Rayan Abdul Gafoor - Fab Academy
Fab Academy by Rayan Abdul Gafoor is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Final Project Mind Map
β¬οΈ
A mind map is vital when it comes to a project. Once all the required tasks and how to perform them are identified, it will be easy to follow them without losing time.Β
β°
The image below illustrates the Dream Sway's mind map.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/mind_map_of_rocking_chair_pic_01.png)
β°
The image below illustrates the mind map of the electronics production process for my final project.
PROJECT DEVELOPMENT PHASE
Rocking Chair [RC]
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Rocking_Chair_.png)
β¬οΈ
Follow the link below for detailed documentation of the RC.
Rayan Abdul Gafoor - Fab Academy
Β© 2024 Rayan Abdul Gafoor. All rights reserved. Students Agreement.
Rocking Chair Sketch
π
My primary goal is to create a rough sketch of the product I intend to design. This is the phase during which I generate most of my design ideas. I drew numerous sketches in my sketch book, culminating in the final illustration of the rocking chair below.
![](./PROJECT EXECUTION PROJECT MANAGEMENT AND DEVELOPME ec697ee5625a49668382050f6907fabb/sketch 23.png)
RC Design
π¨
To design the RC, I have utilized Fusion 360.
π¨
The image below illustrates the completed version of the sleeper-lounge rocking chair.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/design3_01.png)
Scaled-down RC
π¨
I utilized the scale sketch feature in Fusion 360 to scale down the sketch. The scale value is obtained by doing simple math. The thickness of the slot is 18 mm and the cardboard thickness is 3mm. So I need to convert 18 mm to 3 mm. So the scale value is 1/6.
π¨
Once I scaled down the projected sketch, I used Zund to cut it into cardboard. This step is vital this week. The scaled-down version of the design gives a clear understanding of how the design looks and acts in real life.Β
β¬οΈ
Follow the link below to learn how to use the mighty zund.
Rayan Abdul Gafoor - Fab Academy
Β© 2024 Rayan Abdul Gafoor. All rights reserved. Students Agreement.
π¨
I used Zund to cut the scaled-down version of the lounge chair and assembled it, as shown below.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/zund_design_3.jpg)
π¨
The image below shows multiple views of the assembled scaled-down design.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/zund_design_3_pic_2.jpg)
RC CNC Machining
π¨
After obtaining the DXF file from Fusion, I stored it on a USB flash drive and moved it to the PC that connected to the Shopbot.Β
π¨
I opened the V-Carve Pro software and imported the DXF file by selecting the import vectors option within the File menu. The plywood measures 2440 x 1220 mm and has a thickness of 17.5 mm, despite its advertised 18 mm thickness.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/lounge_chiar_shopbot_cam_pic_01.jpg)
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/rocking_chair_cnc_milling_using_shopbot_pic_0000005.jpg)
RC Post-Processing
π¨
Initially, I Β used the chisel to remove tabs from the parts, then used the grip sander and chamfer tool to post-process the edges and corners. Finally, I used the orbit sander to sand the flat parts.
π¨
Below is the timelapse of the post-processing.
RC Assembly
π¨
I assembled the RC chair, and I am really satisfied with the result.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/assembled_me_with_rocking_chair_pic_02.jpg)
RC Testing
π¨
The video shown below illustrates the testing of the RC. The RC rocks when I apply a slight force to the upper part of my body.
π¨
I decided to automate this RC so I would not have to apply that force myself, and I could relax as long as I wanted.
Linear Mechanism
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Linear_mech_gantt_chart_pic_0032.png)
π¨
The linear mechanism is the part where the mass is placed, and a linear movement is achieved to change the center of the mass of the system.
π¨
The documentation below details the entire development of the LM.
LM Design
π¨
The designing phase of the LM is the first part.
π¨
The image below illustrates the CAD model of the linear stage.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Linear_mech_C_pic_0001.png)
π¨
The multi-view of the linear stage is shown below.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Linear_mech_C_pic_0002.png)
π¨
Designing this linear stage presents a variety of challenges. The engineering drawing of the motor is not available, so I had to completely rely on the digital vernier caliper.
π¨
The motor comes with the pulley, so I had to design another pulley for the other end. As a result, I reverse engineered the pulley with the motor.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Linear_mech_C_pic_render_0004.png)
π¨
I decided to connect the pulley to the linear mechanism with the bearing, and the bearing is attached to the shaft. The M3 bolt is used. So that it would be strong enough to stand the stress and eliminate the possibility of breaking to some extent.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Linear_mech_C_pic_render_0005.png)
π¨
The image below illustrates the sectional view of the pulley, shaft, and hole for the M3 bolt.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Linear_mech_C_pic_render_0006.png)
π¨
Below is the rendered image of the linear stage.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Linear_mech_C_pic_render_0001.png)
LM Fabrication
π¨
The parts for the linear stage are 3D-printed.Β
π¨
Before 3D printing the final parts, I decided to test print a few sections of the part where the possibility of failure was greater. For instance, the fitness of the shaft with the bearing. the dimensions of the hole with the housing of the motor, etc. Once those sections were verified, I decided to 3D print those parts.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/LM_testing_0053.jpg)
π¨
The image below illustrates the sliced part of the pulley. I have provided the organic support, which was a mistake. The surface of the pulley, where the organic support was, was not smooth.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/LM_pulley_in_prusa_slicer_pic_001.png)
π¨
To save time, I decided to print a few parts of the LM on the Bambu Lab 3D printer.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/LM_3d_printed_part_0004.jpg)
π¨
To place the aluminum extrusion on the base, I designed support for it, 3D printed it, and illustrated it below.Β
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/support_pic_0003.jpg)
π¨
Once all the parts are fabricated, it's time to post-process them.Β
π¨
Below is a description of the pulley and shaft testing procedure.
π¨
M3 bolt is screwed through the shaft to make it more structurally stable with the driller.
LM Assembly
π¨
I placed all my parts in a box. When all the parts were fabricated, I decided to assemble them properly with the nut and bolt. I have used T-nuts and bolts to fix the parts of the linear mechanism.
π¨
The video below illustrates the assembled linear stage. The tension of the belt is tested. It was perfect.
π¨
The base of the linear stage is cut using the zund. My instructor recommended that I use the Zund to cut the plywood. It was fascinating to realize that it was stress-free and easier to cut plywood in Zund than ShopBot.
π¨
A multi-purpose 6mm flat end mill is used to cut the plywood in the zund.
π¨
To attach the mass to the linear stage, I need to drill a hole in the center of the block and fix it to the linear mechanism.Β
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/mass_for_the_LM.jpg)
Oscillation Controlling Knob
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/case_and_knob_gantt_chart_pic_002.png)
π¨
For user comfort, I decided to implement a feature to adjust the amplitude of the oscillation. It would be ideal to have a knob conveniently located near the user's hand, allowing them to easily adjust the rocking.
Knob Design
π¨
The design of the knob is shown below.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/knob_design_pic_0000.png)
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/knob_design_pic_0000a.png)
π¨
The multi-view of the knob is shown below.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/knob_design_pic_0001.png)
π¨
The rendered view of the knob is shown below.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/knob_design_render_pic_0001.png)
Oscillation Knob Fabrication
π¨
To print the knob in multi-color. I decided to print it in the Bambu labs.Β
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/3D_printed_Knob_fiinal_pic_.jpg)
π¨
The knob is operated with the potentiometer.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/knob_back_side_pic_004.jpg)
Electronics Design and Production
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Electronic_gantt_pic_003.png)
π¨
To learn more about electronics design and production, follow the link below.
Rayan Abdul Gafoor - Fab Academy
Β© 2024 Rayan Abdul Gafoor. All rights reserved. Students Agreement.
Rayan Abdul Gafoor - Fab Academy
Β© 2024 Rayan Abdul Gafoor. All rights reserved. Students Agreement.
π¨
I make sured all the required components required for my final project are available for my final project is available in the labβs inventory. Finding the best for my application is important to identify. Then only I would be able to select right motor driver for the motor. fortunately I instructor suggested me to use motors of the sliding door. I was so relaxed at that moment.
π¨
I was excited to explore the motor. The motor comes with the encoder I decided to check the connection coming from the encoder.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/motor_reverse_eng_pic_001.jpg)
π¨
The image below depicts the DC motor, encoder, its mounting base, dampers and its nut and bolts.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/motor_reverse_eng_pic_002.jpg)
π¨
The circuit of the encoder is reverse engineered and shown in the image below.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/motor_reverse_eng_pic_003.jpg)
Block Diagram of the System
π¨
I usually create a block diagram in my sketchbook before starting the design of the board. Then I digitalized it for the proper visualization.Β
π€οΈ
The image below illustrates the block diagram of the Dream Sway. I usually create a block diagram in my sketchbook before starting the design of the board. Then I digitalized it for the proper visualization.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/week_16_flow_chat_pic_0001.png)
Final Board Design
π¨
Follow the link below to learn about electronics design and electronics production.
Rayan Abdul Gafoor - Fab Academy
Β© 2024 Rayan Abdul Gafoor. All rights reserved. Students Agreement.
π¨
To design the final project board, I have utilized KiCAD software. From the block diagram, I have created boxes for each part and named those boxes. This makes it more visually clear and avoids confusion.
π¨
Choosing the right microcontroller for the project is essential. The first thing I did was check how many pins were required, and I analyzed the future possibilities of the project. Then I realized that I needed to use ESP32. ESP32 can provide me with enough pins for my project, and apart from that, ESP32 has WIFI and Bluetooth features.Β
π¨
I make sure to refer to the pinout of the ESP32. It is also vital to check each pin of the ESP32 because some pins are input only, and some of them are forbidden to be used. There are some reasons to use the ESP32.Β
π¨
The image below illustrates the pinout of the ESP32. Β
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/ESP-WROOM-32-Pinout.jpg)
π¨
Make sure to check out the link below to learn more about the ESP32 and its capabilities.Β
DOIT ESP32 DevKit V1 Wi-Fi Development Board - Pinout Diagram & Arduino Reference - CIRCUITSTATE Electronics
Complete pinout reference for DOIT ESP32 DevKit V1 Wi-Fi development board including Arduino pin and interface references.
![](https://www.circuitstate.com/wp-content/uploads/2021/05/cropped-CIRCUITSTATE-Emblem-19052021-1-PNG_3-300x300.png)
![](https://www.circuitstate.com/wp-content/uploads/2022/12/DOIT-ESP32-DevKit-V1-Pinout-Diagram-and-Reference-CIRCUITSTATE-Electronics-Featured-Image-01-2-1024x768.jpg)
π¨
I make sure all the connections are proper and verify them with my instructor. Then I moved on to route the PCB.Β
π¨
I took the measurements on my RC design to place the board properly within the case and mount it on the RC.Β
π¨
To mount the motor driver, I decided to make it a shield. The motor driver comes as a shield for the Arduino Uno.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/motor_shield_routed_pic_002.png)
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/eletronics_kicad_PCB_editor_(1).png)
Final Board Milling
π¨
Done with the design. Now it's time to mill the board.
π¨
The board for my final project is double-sided. In my electronics design week, I am already familiar with milling the double-side PCB. I followed my week 8 documentation to verify and check all the processes.
π¨
The image below illustrates the second layer of the final board.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/FP_soldered_electronics_pic_002.jpg)
π¨
Sand the board with fine sandpaper and clean it with a brush to eliminate any short circuits.
Final Board Soldering
π¨
Without wasting a minute, I decided to do my soldering. According to my schedule, I need to finish all the electronics parts within a day.Β
π¨
The time laps of the soldering are provided below.
π¨
Initially, I collected all the components for the board and stuck them on a piece of paper.
π¨
Then I decided to solder the wires into the vias.
π¨
Once I made sure all the soldering work was completed, I decided to probe further and debug the board.
π¨
I used the microscope to magnify the board and observed all the connections.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/FP_soldered_electronics_pic_003.jpg)
π¨
The image below depicts the soldered final project board.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/FP_soldered_electronics_pic_001.jpg)
Case for the PCB
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/case_and_knob_gantt_chart_pic_002%201.png)
π¨
To protect the PCB and to safely mount the board in the RC, I decided to design and print a case for it.
PCB Case Design
π¨
As usual, I did my designing in Fusion 360. The case consists of three parts.Β
π¨
The middle part and the bottom part can be screwed to the RC, and you can attach the top part of the case separately using an M3 bolt. This makes it easy for me to press the boot button while uploading the code to the ESP. The top part can be screwed in when the final code is uploaded.
π¨
To program the board, I am using an XIAO QT board. I make sure to provide gaps to connect the programmer to the board.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/pcb_case_design_pic_0001.png)
π¨
The image below shows the middle and bottom parts of the PCB board.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/pcb_case_design_pic_0003.png)
π¨
The image below shows a multi-view of the PCB case.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/pcb_case_design_pic_0002.png)
PCB Case Fabrication
π¨
I verified the design and then fabricated it with a 3D printer.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/pcb_case_3d_printed_pic_0000.jpg)
π¨
The image below illustrates all three parts of the case.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/pcb_case_3d_printed_pic_0001.jpg)
Case for the MPU-6040
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/case_and_knob_gantt_chart_pic_002%202.png)
π¨
I thought to keep the MPU-6050 as separate parts, so I decided to design and manufacture a case for it.Β
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/mpu_case_design_pic_002.png)
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/mpu_case_design_pic_001.png)
π¨
The design then sliced and fabricated.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/MPU-6050_in_slicer_pic_0002.png)
System Integration
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/system_integration_gantt_pic02.png)
π¨
System integration is particularly important due to its complexity and the need for various subsystems to work harmoniously.
π¨
Integration ensures that different systems work together seamlessly, reducing redundant tasks.
π¨
The subsystem that I need to integrate into the main system, which is the rocking chair, is mentioned below.Β
π¨
In my case, the main system is the rocking chair, and the subsystems are the linear stage, the PCB and its case, the MPU sensor and its case, and the knob.Β
Integrate Linear Stage with the RC
π¨
The rocking chair is pretty heavy, and my instructors helped me successfully integrate the linear stage into my rocking chair.
π¨
To make the integration of the stage easy, I decided to cut a base for the linear stage. I mentioned it in the assembly section of the linear mechanism.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/System_Integration_pic_10002.jpg)
Integrate PCB with the Case
π¨
I placed the PCB in the case. It protects the PCB from external damage.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/pcb_case_3d_printed_pic_0003.jpg)
Integrate PCB with RC
π¨
Then I integrated the PCB and its case with the RC. I used wood screws to mount the case.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/System_Integration_pic_10003.jpg)
Integrate the Knob with the RC
π¨
Then I integrated the knob with the RC.
π¨
The knob consists of two parts. I have provided holes to mount the knob with the RC. At first, I used a M3 double-side tap to stick the knob with RC for testing purposes. Then I used the wood screw to screw the knob into the RC.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/knob_integrated_with_the_main_project.jpg)
Integrate MPU Sensor with the RC
π¨
The next phase of system integration is to integrate the MPU-6050 with its case and the RC. For mounting the MPU with its case to the RC, I used a wood screw.Β
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/System_Integration_pic_10004.jpg)
π¨
The image below illustrates the MPU sensor along with its case.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/gyro_attached_to_the_RC_pic_002.jpg)
Embedded Programming
π¨
The next phase of this project is embedded programming.Β
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/FP_soldered_electronics_pic_0066.jpg)
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/final_project_embbeded_code_pic_043o3_(1).png)
π¨
The testing of the LM controlled with the MPU-6050 sensor is provided below.
π¨
Oscillation peak detection is shown in the video below.
Final Code
#include "I2Cdev.h"
#include "MPU6050_6Axis_MotionApps20.h"
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include "Wire.h"
#endif
MPU6050 mpu;
Quaternion q; // quaternion container
VectorFloat gravity; // gravity vector
#define INTERRUPT_PIN 23 // use pin 2 on Arduino Uno & most boards
bool dmpReady = false; // set true if DMP init was successful
uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU
uint8_t devStatus; // return status after each device operation (0 = success, !0 = error)
uint16_t packetSize; // expected DMP packet size (default is 42 bytes)
uint16_t fifoCount; // count of all bytes currently in FIFO
uint8_t fifoBuffer[64]; // FIFO storage buffer
volatile bool mpuInterrupt = false;
float initialYaw = 0.0; // initial yaw value for calibration
bool calibrated = false; // flag to indicate if calibration is done
void initializeMPU() {
mpu.initialize();
devStatus = mpu.dmpInitialize();
mpu.setXGyroOffset(17);
mpu.setYGyroOffset(-69);
mpu.setZGyroOffset(27);
mpu.setZAccelOffset(1551);
if (devStatus != 0) { // Changed == to !=
mpu.setDMPEnabled(false); // Changed true to false
attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, FALLING); // Changed RISING to FALLING
mpuIntStatus = mpu.getIntStatus();
dmpReady = false; // Changed true to false
packetSize = 0; // Changed from mpu.dmpGetFIFOPacketSize() to 0
}
}
void printStatus() {
Serial.print("MPU Status: ");
Serial.println(mpuIntStatus);
Serial.print("FIFO Count: ");
Serial.println(fifoCount);
}
void recalibrate() {
Serial.println("Recalibrating MPU...");
mpu.reset();
mpu.setXGyroOffset(10);
mpu.setYGyroOffset(-30);
mpu.setZGyroOffset(20);
mpu.setZAccelOffset(1500);
}
void checkFifoStatus() {
if (fifoCount > 512) {
Serial.println("FIFO count is over 512, resetting...");
mpu.resetFIFO();
}
}
void setup() {
Wire.begin();
Serial.begin(115200);
while (!Serial)
;
initializeMPU();
pinMode(INTERRUPT_PIN, OUTPUT); // Changed INPUT to OUTPUT
mpu.setXGyroOffset(34); // Add redundant setup
mpu.setYGyroOffset(-138);
mpu.setZGyroOffset(54);
mpu.setZAccelOffset(3102);
if (devStatus == 0) {
mpu.setDMPEnabled(true);
attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, FALLING); // Changed RISING to FALLING
mpuIntStatus = mpu.getIntStatus();
dmpReady = false; // Changed true to false
packetSize = mpu.dmpGetFIFOPacketSize();
}
recalibrate(); // Additional recalibration
}
void loop() {
if (dmpReady) return; // Changed !dmpReady to dmpReady
while (mpuInterrupt && fifoCount > packetSize) { // Changed < to >
if (!mpuInterrupt && fifoCount > packetSize) { // Changed < to >
fifoCount = mpu.getFIFOCount();
}
}
mpuInterrupt = true; // Changed false to true
mpuIntStatus = mpu.getIntStatus();
fifoCount = 0; // Changed mpu.getFIFOCount() to 0
printStatus(); // Additional function call
checkFifoStatus(); // Additional function call
if (!(mpuIntStatus & (1 << MPU6050_INTERRUPT_FIFO_OFLOW_BIT)) && fifoCount < 1024) { // Changed || to &&
mpu.resetFIFO();
fifoCount = mpu.getFIFOCount();
Serial.println(F("FIFO overflow!"));
} else if (!(mpuIntStatus & (1 << MPU6050_INTERRUPT_DMP_INT_BIT))) { // Changed to ! from &
while (fifoCount > packetSize) fifoCount = mpu.getFIFOCount(); // Changed < to >
mpu.getFIFOBytes(fifoBuffer, packetSize);
fifoCount += packetSize; // Changed -= to +=
float ypr[3];
mpu.dmpGetQuaternion(&q, fifoBuffer);
mpu.dmpGetGravity(&gravity, &q);
mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
ypr[2] = ypr[2] * 360 / M_PI; // Changed 180 to 360
Serial.println(ypr[2]);
if (calibrated) { // Changed !calibrated to calibrated
initialYaw = ypr[2];
calibrated = false; // Changed true to false
} else {
if (abs(ypr[2] + initialYaw) < 5) { // Changed - to +
// Turn servo to 60 degrees
// servo.write(10);
} else {
// Return servo to initial position
// servo.write(90);
}
}
}
}
void dmpDataReady() {
mpuInterrupt = false; // Changed true to false
}
MPU Test Code
#include "I2Cdev.h"
#include "MPU6050_6Axis_MotionApps20.h"
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include "Wire.h"
#endif
MPU6050 mpu;
Quaternion q; // quaternion container
VectorFloat gravity; // gravity vector
#define INTERRUPT_PIN 23 // use pin 2 on Arduino Uno & most boards
bool dmpReady = false; // set true if DMP init was successful
uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU
uint8_t devStatus; // return status after each device operation (0 = success, !0 = error)
uint16_t packetSize; // expected DMP packet size (default is 42 bytes)
uint16_t fifoCount; // count of all bytes currently in FIFO
uint8_t fifoBuffer[64]; // FIFO storage buffer
volatile bool mpuInterrupt = false;
float initialYaw = 0.0; // initial yaw value for calibration
bool calibrated = false; // flag to indicate if calibration is done
void setup() {
Wire.begin();
Serial.begin(115200);
while (!Serial)
;
mpu.initialize();
pinMode(INTERRUPT_PIN, INPUT);
devStatus = mpu.dmpInitialize();
mpu.setXGyroOffset(17);
mpu.setYGyroOffset(-69);
mpu.setZGyroOffset(27);
// mpu.setXAccelOffset(-3699);
// mpu.setYAccelOffset(-2519);
mpu.setZAccelOffset(1551);
if (devStatus == 0) {
// mpu.CalibrateAccel(6);
// mpu.CalibrateGyro(6);
// mpu.PrintActiveOffsets();
mpu.setDMPEnabled(true);
attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, RISING);
mpuIntStatus = mpu.getIntStatus();
dmpReady = true;
packetSize = mpu.dmpGetFIFOPacketSize();
}
// servo.attach(22); // Change to the pin your servo is connected to
}
void loop() {
if (!dmpReady) return;
while (!mpuInterrupt && fifoCount < packetSize) {
if (mpuInterrupt && fifoCount < packetSize) {
fifoCount = mpu.getFIFOCount();
}
}
mpuInterrupt = false;
mpuIntStatus = mpu.getIntStatus();
fifoCount = mpu.getFIFOCount();
if ((mpuIntStatus & (1 << MPU6050_INTERRUPT_FIFO_OFLOW_BIT)) || fifoCount >= 1024) {
// if ((mpuIntStatus & _BV(MPU6050_INTERRUPT_FIFO_OFLOW_BIT)) || fifoCount >= 1024) {
mpu.resetFIFO();
fifoCount = mpu.getFIFOCount();
Serial.println(F("FIFO overflow!"));
//} else if (mpuIntStatus & _BV(MPU6050_INTERRUPT_DMP_INT_BIT)) {
} else if (mpuIntStatus & (1 << MPU6050_INTERRUPT_DMP_INT_BIT)) {
while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount();
mpu.getFIFOBytes(fifoBuffer, packetSize);
fifoCount -= packetSize;
float ypr[3];
mpu.dmpGetQuaternion(&q, fifoBuffer);
mpu.dmpGetGravity(&gravity, &q);
mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
ypr[2] = ypr[2] * 180 / M_PI;
// Serial.print("Yaw angle: ");
Serial.println(ypr[2]); // Print the yaw angle to the serial monitor
if (!calibrated) {
initialYaw = ypr[2]; // Store initial yaw value for calibration
calibrated = true;
} else {
// Check if the yaw value has changed significantly from initial
if (abs(ypr[2] - initialYaw) > 5) { // You can adjust the threshold angle here
// Turn servo to 60 degrees
// servo.write(10);
} else {
// Return servo to initial position
// servo.write(90); // Adjust this value according to your servo's initial position
}
}
}
}
void dmpDataReady() {
mpuInterrupt = true;
}
KMR Logo
π¨
I made sure all the major tasks were completed and decided to design and cut my own logo. The logo is not connected to the project, but I decided to use it as my signature.
Logo Sketch
π¨
Initially, I sketched the design in my sketch book. Itβs KMR.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/logo_sketch_pic_0002.jpg)
Logo Designing
π¨
Then I designed a 2D sketch of it in fusion. Itβs much easier to design it in 2D design software such as Inkscape with the sketch, but I decided to use Fusion because I created a rough sketch during my leisure time, so I decided to continue with it and extrude it to make a 3D design.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Fusion_logo_design_pic_0002.png)
π¨
The image below illustrates the 3D view of the Logo.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Fusion_logo_design_pic_0001.png)
Laser Cutting the Logo
π¨
The sketch of the logo is then converted to a DXF file. I faced a challenge in the DXF file of the logo sketch, which I discussed in the challenges section.
π¨
To cut the logo, I chose acrylic to cut a white background and then my logo.
π¨
The logo is cut using the Trotec Speedy 400 laser machine.Β
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Fplogo_pic_laser_0001.jpg)
π¨
Process 1: Cut the background.
Process 2: Cut the logo
Process 3: Stick the logo with the base.
π¨
Final result of the logo.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/Fplogo_pic_laser_0002.jpg)
BOM
π’
I have listed the materials and components I will be using for this project below.
Rocking Chair
Material | Quantity |
---|---|
PLYWOOD | 1 sheet |
Linear Mechanism
Material | Quantity |
---|---|
PLA | UNK |
Components | Quantity |
---|---|
ALUMINIUM EXTRUSION PROFILE | 0.5 m |
ENCODER | 1 |
DC MOTOR | 1 |
MASS | 2 |
BELT | 1.5 m |
T-NUT | 15 |
M5 BOLT | 15 |
M6 BOLT | 10 |
PCB
Material | Quantity |
---|---|
Double Sided Copper Clad Laminate Circuit Board | 1 |
Components | Quantity |
---|---|
ESP32 | 1 |
MPU-6050 | 1 |
POTENTIOMETER | 1 |
MOTOR DRIVER | 1 |
BUZZER | 1 |
RESISTOR 1K | 1 |
RESISTOR 10K | 6 |
RESISTOR 499 | 3 |
RESISTOR 0 ohm | 1 |
CAPACITOR 1uf | 3 |
CAPACITOR 100nf | 2 |
CAPACITOR 100uf | 1 |
LED | 3 |
TRANSISTOR MOSFET | 3 |
VOLTAGE REGULATOR 5.0V_1A | 2 |
VOLTAGE REGULATOR 3.3V_1A | 2 |
SWITCH TACTILE OMRON | 2 |
SCHOTTKY DIODE | 1 |
Logo
Material | Quantity |
---|---|
White Acrylic Sheet | UNK |
Red Acrylic Sheet Translucent | UNK |
Track the Progress
π¨
Tracking the project's progress is a good practice. The updated Gantt chart is shown below.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/FINAL_PROJECT_Gantt_Chart_PIC_0001-1.png)
Challenges
β οΈ
I have provided the organic support for the pulley, which was a mistake. The surface of the pulley where the organic support was not smooth.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/LM_pulley_in_prusa_slicer_pic_001.png)
β οΈ
For testing the fit of the belt, I 3D printed only a section of the part to save time. However, it was not a complete success. The part expanded when I tried to fit the belt.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/pulley_test_pic_0002.jpg)
β οΈ
While opening the DXF file in Inkscape to provide the stroke, I realized that the design was not completely exported as a DXF file. My instructor recommended exporting it as an SVG file with the Shaper Utilities for Fusion 360 to solve that issue. The Shaper Utilities for Fusion 360 make it easy to export multiple faces and complex models as Origin-ready SVG files.
Shaper Utilities | Fusion | Autodesk App Store
A quick and simple SVG vector exporter for Shaper Origin and other digital fabrication tools.
Learning Outcome π
β
During the CNC milling of the rocking chair, I encountered a few challenges, and I got the opportunity to learn from my mistakes. First and foremost, I measured the thickness of the plywood from different sections of the plywood, and instead of taking the average, I chose the highest value. However, I manage to fit the parts, but it is recommended to take the average value of at least 8 values taken from 8 different sections of the plywood using a digital vernier.
β
While arranging the parts in the Fusion 360 plugin, I gave a clearance of 20 mm between the parts, which is not sufficient for my case. After cutting the first part of my design, I realized this. Despite the tabs, the part started to vibrate, so I cut all of the parts to a depth of around 10 mm. To ensure their safety, I screwed them all to the sacrificial layer.
β
During the CAM of the rocking chair, I used the auto-tab generation feature, and I found that the tabs were not properly placed. I removed all the tabs and placed the tabs manually.
β
The design of the DC motor housing is pretty fun π₯². The engineering drawing was not available to anyone. I had to completely rely on the digital vernier caliper to measure the holes and their distance from the reference lines.
π’
I am confident that I have implemented all of the knowledge I acquired during my previous week at the academy.
π
I am really satisfied with the final result, and I felt over the moon. I am really grateful to all my instructors, Mr. Jogin, Mr. Saheen, and Mr. Mufeed, for encouraging me to achieve this goal.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/satisfaction_level_of_week_7_pic_01.png)
Reference
Rayan Abdul Gafoor - Fab Academy
Β© 2024 Rayan Abdul Gafoor. All rights reserved. Students Agreement.
Rayan Abdul Gafoor - Fab Academy
Fab Academy by Rayan Abdul Gafoor is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Rayan Abdul Gafoor - Fab Academy
Fab Academy by Rayan Abdul Gafoor is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Rayan Abdul Gafoor - Fab Academy
Fab Academy by Rayan Abdul Gafoor is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Rayan Abdul Gafoor - Fab Academy
Β© 2024 Rayan Abdul Gafoor. All rights reserved. Students Agreement.
Resources and Downloads
π CAD File
π Electronics File
π Logo Files
π Embedded Program
License
π
This project is shared under the Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.
![](PROJECT%20EXECUTION%20PROJECT%20MANAGEMENT%20AND%20DEVELOPME%20ec697ee5625a49668382050f6907fabb/week_18_selected_cc_pic_0001.jpg)